namespace CSharpPro._1030;

public class Father
{
    //定义字段
    private String name="this is father_name";
    private String nickname="this is father_nickname";
    
    public Father()
    {
    }

    public Father(String name,String nickName)
    {
        this.name = name;
        this.nickname = nickName;
    }
    
    //定义属性
    public String Name
    {
        get => name;
        set => name=value;
    }

    public String NickName
    {
        get => nickname;
        set => nickname=value;
    }

    public void Deconstruct()
    {
        
        Console.WriteLine("father Deconstruct");
    }

    ~Father()
    {
        Console.WriteLine("Father已销毁。");
    }

    public void Print1()
    {
        Console.WriteLine("Father Print1");
    }

    public virtual void Print2()
    {
        Console.WriteLine("Father Print2");
    }
    
    
}